package com.isoft.service.tableservice;

import com.isoft.dao.tabledao.DfmePokeDao;
import com.isoft.entity.tableentity.dfme_poke.DfmePokeMsg;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;

@Service
@Slf4j
public class DfmePokeService {
    @Autowired
    DfmePokeDao dfmePokeDao;
    public int insertmsg(DfmePokeMsg dfmePokeMsg) throws Exception{
        Timestamp create_time = new Timestamp(System.currentTimeMillis());
        dfmePokeDao.insertMeta(create_time,dfmePokeMsg.getDfmePokeMeta());
        return dfmePokeDao.insertDflt(dfmePokeMsg.getDfmePokeMeta().getSeqn(),create_time,dfmePokeMsg.getDfmePokeDflt());

    }
}
